"""
此为环境的主引用类文件
环境运行逻辑发生在这里
"""

import numpy as np
import Entities.Scene as sc
import Logic.Blue_AI as BAI
import Logic.Reward as Reward
import os,time,sys
import Logic.Transition as Tran

class EnvM():
    def __init__(self):
        self.Rounds=0

    def Reset(self,N_R, N_B,Process_index=0,Init_random=True,Decision=None):
        self.NewSc=sc.Scenes(N_R,N_B,Process_index,Init_random,Decision)

    def Step(self,actor):
        eStrategy = BAI.Blue_Strategy(self.NewSc.N_B, self.NewSc.N_R,
                                           self.NewSc.Blue, self.NewSc.Red,
                                            self.NewSc.dt).main()       # 获取地面目标策略
        self.Rounds+=1
        Trans=Tran.StateTra(self.NewSc,actor,eStrategy)
        Observation=self.NewSc.Observate()
        Reward=


    def __GetOb(self):
        pass

    def Render(self):
        pass

    def Save2Mysql(self):
        pass